<!-- head -->
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li><a>主页</a></li>
            <li><a>调单管理</a></li>
            <li class="active"><strong>调单详情</strong></li>
        </ol>
    </div>
</div>
<style>
    .templateStyle{
        margin-left:20px;
        margin-top:7px;
        float: left;
        height:235px;
        word-break:break-all;
    }
</style>
<!-- content-->
<div class="wrapper wrapper-content animated fadeIn" ng-controller="surveyOrderDetailCtrl">
    <form class="form-horizontal" id="form1" name="horizontalCard">
        <div class="form-group">
            <div class="ibox float-e-margins">
                <div class="ibox-content">

                    <div class="row">
                        <div class="ibox-title">
                            <h5>基本信息</h5>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >商户编号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.merchantNo"></p></div>
                            <label class="col-sm-2 control-label" >商户名称:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.merchantName"></p></div>
                            <label class="col-sm-2 control-label" >商户手机号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.merchantPhone"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >收单商户编号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.acqMerchantNo"></p></div>
                            <label class="col-sm-2 control-label" >收单商户名称:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transOrder.acqMerchantName"></p></div>
                            <label class="col-sm-2 control-label" >交易流水号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transOrder.id"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >订单编号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transOrderNo"></p></div>
                            <label class="col-sm-2 control-label" >系统参考号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.acqReferenceNo"></p></div>
                            <label class="col-sm-2 control-label" >交易金额:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transAmount | currency:''"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >交易卡号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transAccountNo"></p></div>
                            <label class="col-sm-2 control-label" >发卡行:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.card.bankName"></p></div>
                            <label class="col-sm-2 control-label" >卡种:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.card.cardType"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >交易方式:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.payMethod |formatDropping:payMethodType"></div>
                            <label class="col-sm-2 control-label" >交易状态:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.transStatus | formatDropping:transStatus"></div>
                            <label class="col-sm-2 control-label" >服务种类:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transOrder.serviceName"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >机具类型:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transOrder.typeName"></p></div>
                            <label class="col-sm-2 control-label" >调单类型:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.orderTypeCode | formatDropping:orderTypeCodeList"></div>
                            <label class="col-sm-2 control-label" >回复状态:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.replyStatus | formatDropping:replyStatusSelect"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >发起时间:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.createTime | date:'yyyy-MM-dd HH:mm:ss'"></div>
                            <label class="col-sm-2 control-label" >回复截止时间:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.replyEndTime | date:'yyyy-MM-dd HH:mm:ss'"></div>
                            <label class="col-sm-2 control-label" >一级代理商所属销售:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.saleName"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >实际交易手续费:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.transOrder.merchantFee | currency:''"></div>
                            <label class="col-sm-2 control-label" >结算金额:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transOrder.outAmount | currency:''"></p></div>
                            <label class="col-sm-2 control-label" >银联报备商户编号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.transOrder.unionpayMerNo"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >提交回复角色:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.replyTypeName"></p></div>
                        </div>
                        <div ng-show="hasPermit('surveyOrder.log')" >
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >上游回复状态:</label>
                                <div class="col-sm-2 checkbox" ng-bind="info.acqReplyStatus | formatDropping:acqReplyStatusSelect"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >上游回复备注:</label>
                                <div class="col-sm-10 checkbox">
                                    <textarea class="form-control" rows="4" cols="15" readonly ng-model="info.acqReplyRemark"></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >调单备注:</label>
                            <div class="col-sm-10 checkbox">
                                <textarea class="form-control" rows="4" cols="15" readonly ng-model="info.orderRemark"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >调单模版下载:</label>
                            <div class="col-sm-10">
                                <div class="col-sm-4" ng-repeat="item in info.templateList" >
                                    <div class="templateStyle">
                                        <a ng-click="updateFile(item.name)" style="">{{item.name}}</a>
                                        <div style="margin-top:20px">
                                            <div style="width: 250px; padding: 0; margin:0; box-sizing: content-box; height: 150px; border: 1px solid #eee;" class="col-img">
                                                <a href="{{item.imgUrl}}" fancybox rel="group" ng-if="item.type=='2'">
                                                    <img width="250px" height="150px" ng-src="{{item.imgUrl}}"/>
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="ibox-title">
                            <h5>调单处理</h5>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >处理状态:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.dealStatus | formatDropping:dealStatusSelect"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >备注说明:</label>
                            <div class="col-sm-10 checkbox">
                                <textarea class="form-control" rows="4" cols="15" readonly ng-model="info.dealRemark"></textarea>
                            </div>
                        </div>
                        <div class="ibox-title">
                            <h5>调单回复</h5>
                            <div style="margin-left:100px;">
                                <a ng-click="openReplyModal()">{{replyTitle}}</a>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >回复结果:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.reply.replyResult | formatDropping:orderReplyResultList"></div>
                            <label class="col-sm-2 control-label" >商户姓名:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.reply.merName"></p></div>
                            <label class="col-sm-2 control-label" >持卡人姓名:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.reply.cardPersonName"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >持卡人电话:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.reply.cardPersonMobile"></p></div>
                            <label class="col-sm-2 control-label" >真实商户名称:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.reply.realName"></p></div>
                            <label class="col-sm-2 control-label" >归属省市:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.reply.province+' '+info.reply.city"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >真实交易地址:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.reply.transAddress"></p></div>
                            <label class="col-sm-2 control-label" >商户电话:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.reply.merMobile"></p></div>
                            <label class="col-sm-2 control-label" >回复时间:</label>
                            <div class="col-sm-2 checkbox" ng-bind="info.reply.createTime | date:'yyyy-MM-dd HH:mm:ss'"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >回复代理商编号:</label>
                            <div class="col-sm-2 checkbox"><p ng-bind="info.reply.replyRoleNo"></p></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >调单回复:</label>
                            <div class="col-sm-10 checkbox">
                                <textarea class="form-control" rows="4" cols="15" readonly ng-model="info.reply.replyRemark"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" >调单模版下载:</label>
                            <div class="col-sm-10">
                                <div class="col-sm-4" ng-repeat="item in info.reply.replyFilesList" >
                                    <div class="templateStyle">
                                        <a ng-click="updateFile(item.name)" style="">{{item.name}}</a>
                                        <div style="margin-top:20px">
                                            <div style="width: 250px; padding: 0; margin:0; box-sizing: content-box; height: 150px; border: 1px solid #eee;" class="col-img">
                                                <a href="{{item.imgUrl}}" fancybox rel="group" ng-if="item.type=='2'">
                                                    <img width="250px" height="150px" ng-src="{{item.imgUrl}}"/>
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div ng-show="hasPermit('surveyOrder.log')" >
                            <div class="ibox-title">
                                <h5>调单日志</h5>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label" ></label>
                                <div class="col-lg-9">
                                    <div  style="height: 300px" class="gridStyle" ui-grid="userGrid" ui-grid-selection class="grid" ui-grid-resize-columns></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-12 bgff">
                <div class="col-sm-12">
                    <div class="col-lg-3"></div>
                    <div class="col-sm-6">
                        <a class="btn btn-primary4" ui-sref="risk.surveyOrder" >返回</a>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <div id="replyModal" class="modal fade form-horizontal" tabindex="4" role="dialog">
        <div class="modal-dialog" style="height:800px;width: 1200px">
            <div class="modal-content" >
                <form class="form-horizontal" name="horizontalCard"  novalidate>
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            &times;</button>
                        <h3 class="modal-title">调单回复记录</h3>
                    </div>
                    <div class="modal-body">
                        <div ng-repeat="item in info.replyList">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >回复结果:</label>
                                <div class="col-sm-2 checkbox" ng-bind="item.replyResult | formatDropping:orderReplyResultList"></div>
                                <label class="col-sm-2 control-label" >商户姓名:</label>
                                <div class="col-sm-2 checkbox"><p ng-bind="item.merName"></p></div>
                                <label class="col-sm-2 control-label" >持卡人姓名:</label>
                                <div class="col-sm-2 checkbox"><p ng-bind="item.cardPersonName"></p></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >持卡人电话:</label>
                                <div class="col-sm-2 checkbox"><p ng-bind="item.cardPersonMobile"></p></div>
                                <label class="col-sm-2 control-label" >真实商户名称:</label>
                                <div class="col-sm-2 checkbox"><p ng-bind="item.realName"></p></div>
                                <label class="col-sm-2 control-label" >归属省市:</label>
                                <div class="col-sm-2 checkbox"><p ng-bind="item.province+' '+info.reply.city"></p></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >真实交易地址:</label>
                                <div class="col-sm-2 checkbox"><p ng-bind="item.transAddress"></p></div>
                                <label class="col-sm-2 control-label" >商户电话:</label>
                                <div class="col-sm-2 checkbox"><p ng-bind="item.merMobile"></p></div>
                                <label class="col-sm-2 control-label" >回复时间:</label>
                                <div class="col-sm-2 checkbox" ng-bind="item.createTime | date:'yyyy-MM-dd HH:mm:ss'"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >回复代理商编号:</label>
                                <div class="col-sm-2 checkbox"><p ng-bind="item.replyRoleNo"></p></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >调单回复:</label>
                                <div class="col-sm-10 checkbox">
                                    <textarea class="form-control" rows="4" cols="15" readonly ng-model="item.replyRemark"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >备注说明:</label>
                                <div class="col-sm-10 checkbox">
                                    <textarea class="form-control" rows="4" cols="15" readonly ng-model="item.lastDealRemark"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >附件下载:</label>
                                <div class="col-sm-10">
                                    <div class="col-sm-4" ng-repeat="item1 in item.replyFilesList" >
                                        <div class="templateStyle">
                                            <a ng-click="updateFile(item1.name)" style="">{{item1.name}}</a>
                                            <div style="margin-top:20px">
                                                <div style="width: 250px; padding: 0; margin:0; box-sizing: content-box; height: 150px; border: 1px solid #eee;" class="col-img">
                                                    <a href="{{item1.imgUrl}}" fancybox rel="group" ng-if="item1.type=='2'">
                                                        <img width="250px" height="150px" ng-src="{{item1.imgUrl}}"/>
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group"  ng-if="$index!=info.replyList.length-1">
                                <label class="col-sm-1 control-label" ></label>
                                <div class="col-sm-11">
                                    <div style=" border-bottom: 1px solid #000000;"></div>
                                </div>
                            </div>

                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

</div>